import request from '@/utils/request'

export default{
    //收入列表（条件查询分页）
    //current当前页 limit每页记录数 
    getIncomeListPage(current,limit,incomeListForm){
        return request({
            url: `/accounts/income/findAll/${current}/${limit}`,
            method: 'post',
            data: incomeListForm
          })
    },
    saveIncome(income){
        return request({
            url: '/accounts/income/save',
            method: 'post',
            data: income
        })
    },
    // 通过数据库中字段删除
    removeById(id){
        return request({
            url: `/accounts/income/removeById/${id}`,
            method: 'delete'
        })
    },
    updateById(income){
        return request({
            url: '/accounts/income/updateById',
            method: 'put',
            data: income
        })
    },
    getMoneySum(income){
        return request({
            url: '/accounts/income/getMoneySum',
            method: 'post',
            data: income
        })
    }
    
}
